export class ArrayEnhance {
    public static staticFlatArray<T>(arrayItem: Array<T|T[]>) {
        const newArr: T[] = [];
        arrayItem.forEach((item) => {
            if (item instanceof Array) {
                const childList = ArrayEnhance.staticFlatArray(item);
                childList.forEach(childItem => {
                    newArr.push(childItem);
                });
            } else {
                newArr.push(item);
            }
        });
        return newArr;
    }
}
